package com.example.navigationsample

import android.annotation.SuppressLint
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.TextView
import androidx.fragment.app.Fragment

class TestFragment(private val content: String) : Fragment() {

    lateinit var myView: View

    @SuppressLint("InflateParams")
    override fun onCreateView(
        inflater: LayoutInflater,
        container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View {
        myView = inflater.inflate(R.layout.fragment_layout, container, false)
        initView()
        return myView
    }

    private fun initView() {
        myView.findViewById<TextView>(R.id.tv_text).text = content
    }
}